{% extends 'base_user.html' %}

{% load static %}

{% block title %}
    {{ block.supper }}

    登录
{% endblock %}

{% block ext_js %}
    {{ blocke.super }}

    <script type="text/javascript" src="{% static 'axf/user/login/login.js' %}"></script>
{% endblock %}

{% block content %}
    {{ block.super }}

    <div class="container">
        <form action="{% url 'axfuser:login' %}" method="post">

            {% csrf_token %}

            <span style="color: red">{{ msg }}</span>

            <div class="form-group">
                <label for="exampleInputName">用户名</label>
                <input type="text" name="name" class="form-control" id="exampleInputName" placeholder="请输入用户名：">
                <span id="nameinfo"></span>
            </div>
            <div class="form-group">
                <label for="exampleInputPassword1">密码</label>
                <input type="password" class="form-control" id="exampleInputPassword1" name="password"
                       placeholder="请输入密码：">
            </div>
            <div class="form-group">

                {# 这里src发送get请求，还可以响应接收的数据#}
                <div>
                    <img style="width: 98px;height: 38px;margin-bottom: 5px" src="/axfuser/get_code/" alt="" id="changeImage">
                </div>

                <input type="text" class="imgCode" name="imgcode"
                       placeholder="请输入验证码：">

            </div>

            <button type="submit" class="btn btn-success btn-block">登录</button>

        </form>
    </div>
{% endblock %}